<!--
 * @Author         : yanyongyu
 * @Date           : 2022-09-16 11:32:34
 * @LastEditors    : yanyongyu
 * @LastEditTime   : 2022-09-22 03:31:39
 * @Description    : None
 * @GitHub         : https://github.com/yanyongyu
-->

{% from "components/issue/title.html.jinja" import issue_title %}
{% from "components/issue/state.html.jinja" import issue_state %}

{% macro issue_header(issue) %}
<div class="color-bg-default mb-3">
  {{ issue_title(issue) }}
  <div
    class="
      d-flex
      flex-items-center flex-wrap
      pb-2 mt-0 mb-3
      border-bottom color-border-default color-fg-muted
    "
  >
    {{ issue_state(issue, "flex-shrink-0 mb-2 flex-self-start flex-md-self-center") }}
    <div class="flex-auto min-width-0 mb-2">
      <a href="#" class="author text-bold Link--secondary">{{ issue.user.login|escape }}</a>
      opened this issue {{ issue.created_at|relative_time }}
      · {{ issue.comments }} comments
    </div>
  </div>
</div>
{% endmacro %}
